package b.b.h;

import android.content.Context;
import android.graphics.Rect;
import android.view.LayoutInflater;
import android.view.View;
import android.view.WindowManager;
import android.view.WindowManager.LayoutParams;
import android.widget.TextView;

/* compiled from: TooltipPopup */
public class j0 {
    public final Context a;
    public final View b;
    public final TextView c;
    public final LayoutParams d;
    public final Rect e = new Rect();
    public final int[] f = new int[2];
    public final int[] g = new int[2];

    public j0(Context context) {
        LayoutParams layoutParams = new LayoutParams();
        this.d = layoutParams;
        this.a = context;
        View inflate = LayoutInflater.from(context).inflate(2131492891, null);
        this.b = inflate;
        this.c = (TextView) inflate.findViewById(2131296715);
        layoutParams.setTitle(j0.class.getSimpleName());
        layoutParams.packageName = context.getPackageName();
        layoutParams.type = 1002;
        layoutParams.width = -2;
        layoutParams.height = -2;
        layoutParams.format = -3;
        layoutParams.windowAnimations = 2131755014;
        layoutParams.flags = 24;
    }

    public void a() {
        if ((this.b.getParent() != null ? 1 : null) != null) {
            ((WindowManager) this.a.getSystemService("window")).removeView(this.b);
        }
    }
}
